#!/usr/bin/python

from indexFunctions import *
from TopologicalIndex import TopologicalIndex
from sys import stdin, argv
from networkx import parse_graph6
from GraphGroup import GraphGroup
from ged1GroupGenerator import generateGED1FromGraph
# 
# indexes = []
# for function in [R, M1, M2, ABC, SCI, GA1, AZI, HI, lnP1, lnP1S,lnP2, ALB]:
#     indexes.append(TopologicalIndex(function))
#     
#     
# group = GraphGroup()
# for graph6Graph in stdin:
#     graph = parse_graph6(graph6Graph.strip()) 
#     group.addGraph(graph)
#     
# group.drawTiHistograms(argv[1], indexes)


indexes = []
for function in [R, ABC, AZI]:
    indexes.append(TopologicalIndex(function))
    
    

for graph6Graph in stdin:
    graph = parse_graph6(graph6Graph.strip()) 
    group = generateGED1FromGraph(graph)
    group.drawTiHistograms(graph6Graph, indexes)    

